#include "widget.h"
#include "ui_widget.h"
#include <QDebug>

Widget::Widget(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::Widget)
{
    ui->setupUi(this);
    this->setWindowTitle("进度模块");
    this->setWindowIcon(QIcon(":/global.png"));

    // 点击获取值
    connect(ui->get, &QPushButton::clicked, [=](){
        qDebug() << ui->widget->getNum();
    });
    connect(ui->set, &QPushButton::clicked, [=](){
        ui->widget->setNum(50);
    });
}

Widget::~Widget()
{
    delete ui;
}
